24 hour pH study and upper endoscopy (EGD)